package com.ruoyi.attendance.mapper;

import java.util.Date;
import java.util.List;

import com.ruoyi.attendance.domain.AttendancePolicies;
import com.ruoyi.attendance.domain.AttendanceRecord;
import com.ruoyi.attendance.entity.EmployeeInfo;
import org.apache.ibatis.annotations.Param;

/**
 * 员工考勤记录Mapper接口
 * 
 * @author ruoyi
 * @date 2025-06-05
 */
public interface AttendanceRecordMapper 
{
    /**
     * 查询员工考勤记录
     * 
     * @param id 员工考勤记录主键
     * @return 员工考勤记录
     */
    public AttendanceRecord selectAttendanceRecordById(Integer id);

    /**
     * 查询员工考勤记录列表
     * 
     * @param attendanceRecord 员工考勤记录
     * @return 员工考勤记录集合
     */
    public List<AttendanceRecord> selectAttendanceRecordList(AttendanceRecord attendanceRecord);

    /**
     * 新增员工考勤记录
     * 
     * @param attendanceRecord 员工考勤记录
     * @return 结果
     */
    public int insertAttendanceRecord(AttendanceRecord attendanceRecord);

    /**
     * 修改员工考勤记录
     * 
     * @param attendanceRecord 员工考勤记录
     * @return 结果
     */
    public int updateAttendanceRecord(AttendanceRecord attendanceRecord);

    /**
     * 删除员工考勤记录
     * 
     * @param id 员工考勤记录主键
     * @return 结果
     */
    public int deleteAttendanceRecordById(Integer id);

    /**
     * 批量删除员工考勤记录
     * 
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteAttendanceRecordByIds(Integer[] ids);

    AttendanceRecord selectAttendanceRecordByUserIdAndDate(@Param("userId") Integer userId, @Param("recordDate") Date recordDate);

    EmployeeInfo selectEmployeeInfoById(Integer userId);

    List<AttendanceRecord> selectAttendanceRecordByUserIdAndDateRange(@Param("userId") Integer userId, @Param("beginRecordDate") Date startDate, @Param("endRecordDate") Date endDate);

    Integer selectActualAttendanceDaysByUserIdAndDateRange(@Param("userId") Integer userId, @Param("beginRecordDate") Date startDate, @Param("endRecordDate") Date endDate);


    ;
}
